package org.dealpdf.model;

import lombok.Data;

import java.util.Map;

@Data
/**
 * 导出8D报告
 */
public class ProblemMap {
    private String problemTitle;
    private String jiraCode;
    private String happenPlace;
    private String happenDate;
    private String chargePersonName;
    private String chargePersonDeptName;
    private String launchPersonName;
    private String launchPersonDeptName;
    private String createTime;
    private String problemCode;
    private String problemSource;
    private String severity;
    private String occurrenceFrequency;
    private String vin;
    private String partSerialNumber;
    private String softwareBaseline;
    private String hardwareVersion;
    private String instrumentFaultWarning;
    private String supplierName;
    private String projectName;
    private String who;
    private String what;
    private String wherePlace;
    private String whenTime;
    private String amount;

    public ProblemMap(Map<String, String> data) {
        this.problemTitle = data.getOrDefault("problem_title", "");
        this.jiraCode = data.getOrDefault("jira_code", "");
        this.happenPlace = data.getOrDefault("happen_place", "");
        this.happenDate = data.getOrDefault("happen_date", "");
        this.chargePersonName = data.getOrDefault("charge_person_name", "");
        this.chargePersonDeptName = data.getOrDefault("charge_person_dept_name", "");
        this.launchPersonName = data.getOrDefault("launch_person_name", "");
        this.launchPersonDeptName = data.getOrDefault("launch_person_dept_name", "");
        this.createTime = data.getOrDefault("create_time", "");
        this.problemCode = data.getOrDefault("problem_code", "");
        this.problemSource = data.getOrDefault("problem_source", "");
        this.severity = data.getOrDefault("severity", "");
        this.occurrenceFrequency = data.getOrDefault("occurrence_frequency", "");
        this.vin = data.getOrDefault("vin", "");
        this.partSerialNumber = data.getOrDefault("part_serial_number", "");
        this.softwareBaseline = data.getOrDefault("software_baseline", "");
        this.hardwareVersion = data.getOrDefault("hardware_version", "");
        this.instrumentFaultWarning = data.getOrDefault("instrument_fault_warning", "");
        this.supplierName = data.getOrDefault("supplier_name", "");
        this.projectName = data.getOrDefault("project_name", "");
        this.who = data.getOrDefault("who", "");
        this.what = data.getOrDefault("what", "");
        this.wherePlace = data.getOrDefault("where_place", "");
        this.whenTime = data.getOrDefault("when_time", "");
        this.amount = data.getOrDefault("amount", "");
    }
}